﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>00: Gadget in Iframe Test</title>
	<style type="text/css">
		body, html {
			width: 100%;
			height: 100%;
			margin: 0;
			overflow: hidden;
			font-family: "Segoe UI", Arial, Verdana;
			font-size: 9pt;
			background-color: #F1F1F1;
		}
	</style>
	<script src="../../../bootloader.js" type="text/javascript"></script>
	<!-- -->
	<script type="text/javascript">
		go = function() {
			view = new opus.View({
				minWidth: 376,
				minHeight: 164,
				styles: {border: 8, padding: 4, borderColor: "green"},
				layoutKind: "vbox",
				controls: [
					{content: "This is an iframe containing a gadget.", w: "100%", h: 24},
					{name: "editor", type: "opus.Editor", value: "http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/horoscope.xml&amp;up_day=&amp;up_month=1&amp;up_year=&amp;up_signSnap=&amp;up_sign=Gemini&amp;synd=open&amp;&amp;title=Today's+Horoscope&amp;lang=en&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=html" + "&swizzle=" + (new Date()).getTime(), l:0, w:"100%"},
					//{name: "editor", type: "opus.Editor", value: "http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/horoscope.xml&amp;up_day=&amp;up_month=1&amp;up_year=&amp;up_signSnap=&amp;up_sign=Gemini&amp;synd=open&amp;&amp;title=Today's+Horoscope&amp;lang=en&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=html", l:0, w:"100%"},
					{type: "opus.Aristo.Button", content: "Load", l:0, w:100, onclick: "loadIframeSrc"},
					{name: "gadgetHost", type: "Iframe", w:"100%", h:"100%", src: "http://www.gmodules.com/ig/ifr?url=http://throttled.org/googlegadgets/youtubesearch.xml&amp;synd=open&amp;&amp;title=Search+YouTube&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=html" + "&swizzle=" + (new Date()).getTime()}
					//{name: "gadgetHost", type: "Iframe", w:"100%", h:"100%", src: "http://www.gmodules.com/ig/ifr?url=http://throttled.org/googlegadgets/youtubesearch.xml&amp;synd=open&amp;&amp;title=Search+YouTube&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=html"}
				],
				loadIframeSrc: function() {
					var src = this.$.editor.getValue();
					this.$.gadgetHost.node.src = src;
				}
			});
		}
	</script>
</head>
<body onload="go()">
<!--
	<div style="border: 2px solid red; height: 500px; width: 500px;">
		<script src="http://www.gmodules.com/ig/ifr?url=http://throttled.org/googlegadgets/youtubesearch.xml&amp;synd=open&amp;w=320&amp;h=250&amp;title=Search+YouTube&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js&callback=foo"></script>
	</div>-->
</body>
</html>
